package com.shrct.businessprocess.purchase;

import com.shrct.businessprocess.purchase.RCPurchaseIncomeRequestStatCriteriaData;
import edu.fudan.mylang.pf.query.BaseStatCriteria;
import java.util.Collection;

public class RCPurchaseIncomeRequestStatCriteria extends BaseStatCriteria<RCPurchaseIncomeRequestStatCriteriaData> {
  public void initOrderBys() {
    
  }
  
  public Collection<RCPurchaseIncomeRequestStatCriteriaData> list() {
    criteria.postInitialize();
    initOrderBys();
    String aggrCriteria = " select new com.shrct.businessprocess.purchase.RCPurchaseIncomeRequestStatCriteriaData(sum(this.amount.amount * this.amount.exchange.rate))"
    		+ criteria.getHQLFrom() + " " + criteria.getHQLBodyWithActiveCondition();
    org.hibernate.Query query = entities.createQuery(aggrCriteria);
    criteria.fillParameters(query);
    return doList(query);
    
  }
}
